//Player class-
#include "Player.h"

//default constructor
Player::Player() {
    //set the current health
    CurrHealth = 50;
    //set the maximum health
    MaxHealth = 50;
    //set the base damage
    BaseDamage = 5;
}

//OnLoad
bool Player::OnLoad(char* File, int Width, int Height, int MaxFrames) {
    if(Entity::OnLoad(File, Width, Height, MaxFrames) == false) {
        return false;
    }
    return true;
}

//OnLoop
void Player::OnLoop() {
    Entity::OnLoop();
}

//OnRender
void Player::OnRender(SDL_Surface* Surf_Display) {
    Entity::OnRender(Surf_Display);
}

//OnCleanup
void Player::OnCleanup() {
    Entity::OnCleanup();
}

//OnAnimate
void Player::OnAnimate() {
    if(SpeedX != 0) {
        Anim_Control.MaxFrames = 8;
    }else{
        Anim_Control.MaxFrames = 0;
    }

    Entity::OnAnimate();
}

//OnCollision
bool Player::OnCollision(Entity* Entity) {
return true;
}

//GetCurrHealth
int Player::GetCurrHealth(){
    return CurrHealth;
}

//GetMaxHealth
int Player::GetMaxHealth(){
    return MaxHealth;
}

//GetBaseDamage
int Player::GetBaseDamage(){
    return BaseDamage;
}

//SetCurrHealth
void Player::SetCurrHealth(int Health){
    CurrHealth=Health;
}

//SetMaxHealth
void Player::SetMaxHealth(int Health){
    MaxHealth=Health;
}

//SetBaseDamage
void Player::SetBaseDamage(int Damage){
    BaseDamage = Damage;
}
